--[[ EmblemLootDisable.lua 0.1
 By Claptrap
 Changelog: 
 2009-09-02: Started development
 these variables come from GlobalStrings.lua and will have the correct
 translation for the installed client
 * LOOT_ITEM = "%s receives loot: %s.";
 * LOOT_ITEM_MULTIPLE = "%s receives loot: %sx%d.";
]]

ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT", function(self, event, msg, ...)
    receiver, item = msg:find(string.gsub(string.gsub(LOOT_ITEM, "(%%s)", "(.+)"), "(%%d)", "(.+)"))
    if receiver ~= nil and item ~= nil then
        if receiver ~= UnitName("player")
            local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType = GetItemInfo(item)
            if itemType ~= nil
                return (itemType == "Money")
            end
        end
    end
    return false
end)

